package com.boarsoft.boar.demo.product.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.boarsoft.boar.demo.product.biz.PocProductBiz;
import com.boarsoft.boar.demo.product.entity.PocProduct;
import com.boarsoft.cache.aop.Cached;

@Service("productServ")
public class PocProductServiceImpl implements PocProductService {

	@Autowired
	private PocProductBiz productBiz;

	@Override
	public boolean add(PocProduct p) {
		return productBiz.add(p);
	}

	@Override
	public boolean update(PocProduct p) {
		return productBiz.add(p);
	}

	@Override
	@Cached(group = "product", index = 0)
	public PocProduct get(int id) {
		return productBiz.get(id);
	}
}
